﻿namespace Borg
{
    public interface IComposer
    {
        void Open(Slot slot);
        void Plug(Slot slot, Plug plug);
        void Tag(Slot slot, Plug plug, string tag);
        void Close(Slot slot);
        void Unplug(Slot slot, Plug plug);
        void Untag(Slot slot, Plug plug, string tag);

        void SetAutoOpen(Slot slot, bool value);
        void SetAutoPlug(Slot slot, bool value);
        void SetAutoTag(Slot slot, string[] value);
        void SetShared(Slot slot, bool value);
        void SetAutoPlug(Plug plug, bool value);
        void SetAutoTag(Plug plug, string[] value);

        bool CanOpen(Slot slot);
        bool CanPlug(Slot slot, Plug plug);
        bool CanTag(Slot slot, Plug plug, string tag);
        bool CanClose(Slot slot);
        bool CanUnplug(Slot slot, Plug plug);
        bool CanUntag(Slot slot, Plug plug, string tag);
        bool CanOpen(Slot slot, out LogArgs log);
        bool CanPlug(Slot slot, Plug plug, out LogArgs log);
        bool CanTag(Slot slot, Plug plug, string tag, out LogArgs log);
        bool CanClose(Slot slot, out LogArgs log);
        bool CanUnplug(Slot slot, Plug plug, out LogArgs log);
        bool CanUntag(Slot slot, Plug plug, string tag, out LogArgs log);
    }
}

